package com.gitee.elklog;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@SpringBootApplication
public class ElkLogApplication {

    public static void main(String[] args) {
        SpringApplication.run(ElkLogApplication.class, args);
    }

    @RequestMapping("/log")
    public String log() {
        log.info("begin elk log test");
        log.warn("elk log warn");
        log.debug("elk log debug");
        log.error("elk log error");
        return "success";
    }
}
